package com.web.hotel.vo.mapper;

import com.web.hotel.vo.RoomVo;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by chen on 2017/3/12.
 */
public class RoomVoMapper implements RowMapper<RoomVo> {
    public RoomVo mapRow(ResultSet resultSet, int i) throws SQLException {
        RoomVo room =new RoomVo();
        room.setRoomId(resultSet.getInt("roomId"));
        room.setRoomName(resultSet.getString("roomName"));
        room.setRoomType(resultSet.getString("roomType"));
        room.setRoomStatus(resultSet.getInt("roomStatus"));
        room.setRoomPay(resultSet.getInt("roomPay"));
        room.setRoomDesc(resultSet.getString("roomDescription"));
        room.setRoomPicture(resultSet.getString("roomPicture"));
        room.setHotelName(resultSet.getString("hotelName"));
        return room;
    }
}
